﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Input;
using WCYCReader.Pages;

namespace WCYCReader.UserControls
{
    public partial class ReaderPageHelp : UserControl
    {
        private PhoneApplicationPage _BasePage;

        public ReaderPageHelp(PhoneApplicationPage basePage)
        {
            this.InitializeComponent();
            base.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(this.HelpPage_ManipulationStarted);
            base.ManipulationDelta += new EventHandler<ManipulationDeltaEventArgs>(this.HelpPage_ManipulationDelta);
            base.ManipulationCompleted += new EventHandler<ManipulationCompletedEventArgs>(this.HelpPage_ManipulationCompleted);
            this._BasePage = basePage;
        }

        private void HelpPage_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            e.Handled = true;
            (this._BasePage as BookReaderPage).RemoveHelpPage();
        }

        private void HelpPage_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
        {
            e.Handled = true;
        }

        private void HelpPage_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
        {
            e.Handled = true;
        }

    }
}
